/*
	Copyright (C) 2008 Demiurg-HG
	
	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License
	as published by the Free Software Foundation; either version 2
	of the License, or (at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
// i_system.h - 







struct	systemTime_t {
		word	year,	month,	day_of_week,	day;
		word	hour,	minute,	sec,	msec;
	};


typedef	uint	thread_t;
typedef uint	(SYS_CALL *threadFunc_f)	( void *param );


interface	ISystem
	{
		virtual					~ISystem		( void ) {};

		virtual const char		*GetCmdLine		( void ) = 0;			//	program arguments
																	
		virtual	uint			Milliseconds	( void ) = 0;			//	retrieves the time elapsed since game started
		virtual	systemTime_t	GetGMTTime		( void ) = 0;			//	retrievse the GMT system time
		virtual	systemTime_t	GetLocalTime	( void ) = 0;			//	retrievse the local system time
		
		virtual	void			Quit			( uint code ) = 0;		//	normal quit
		virtual void			Terminate		( uint code ) = 0;		//	immediate quit
		
		virtual uint			DLL_Load		( const char *dll_name ) = 0;
		virtual void			DLL_Free		( uint dll ) = 0;
		virtual void*			DLL_GetProcAddr	( uint dll, const char *func_name ) = 0;
		
		virtual thread_t		SpawnThread		( threadFunc_f func, void *param ) = 0;
		virtual void			KillThread		( thread_t thread ) = 0;
		virtual void			Sleep			( uint msec ) = 0;
	};
	
